class CustomerBackup < ActiveRecord::Base
  has_many :phones , :through =>:customers_phones
  has_many :customers_phones
  has_many :customer_addresses
  has_many :orders
  has_many :tickets
  belongs_to :order
  has_one :customer_info
  belongs_to :customer_type
  belongs_to :card_type
  belongs_to :user
  
  has_many :as_passenger_tickets, :class_name => 'Ticket', :foreign_key => 'passenger_id' #作为常旅客的票
end
